class PrintProduct < ActiveRecord::Base
  belongs_to :category, :class_name => 'PrintCategory', :foreign_key => 'print_category_id'
  has_many :fields, :class_name => 'PrintProductField', :foreign_key => 'print_product_field_id'
  
  validates_presence_of :model, :message => "必须填写对应的Rails Model模型名称"
  validates_presence_of :name, :message => "必须填写产品名称"
end
